<div style="padding-top: 60px;">
    <div id="reg" style="padding-top: 60px">
        <div style="width: 100%;background-color: #ffa000;height: 3px;"></div>
        <div class="regPanel">
            <ul>
                <li class="backColor">
                    <input type="text" value="${userSession.cellPhone}"
                           style="background-image:url('/statics/imgs/icon-my-l.png?v=${params.ver}');"
                           id="mobile" name="mobile"
                           placeholder="请输入手机号" disabled>
                    <span id="mobilePopImg" class="popImg imgHide"><img src="/statics/imgs/ok.png?v=${params.ver}"></span>
                    <span id="mobilePop" class="pop"></span>
                </li>
                <%--<li class="backColor">
                    <input style="width: 60%;background-image:url('/statics/imgs/icon-key-l.png?v=${params.ver}');"
                           id="verifyCode" type="text"
                           placeholder="请输入验证码">

                    <div href="#" id="send_sms_rzm" class="rzm">发送认证码</div>
                    <span id="smsPopImg" class="popImg imgHide"><img src="/statics/imgs/ok.png?v=${params.ver}"></span>
                    <span id="smsPop" class="pop" style="right:43%"></span>
                </li>--%>
                <li class="backColor">
                    <input type="password" style="background-image:url('/statics/imgs/icon-lock-l.png?v=${params.ver}');"
                           id="password"
                           placeholder="请输入新密码" name="psssword">
                    <span id="pw1PopImg" class="popImg imgHide"><img src="/statics/imgs/ok.png?v=${params.ver}"></span>
                    <span id="pw1Pop" class="pop"></span>
                </li>
                <li class="a" style="text-align: left;">

                <li>
                    <div id="registButton"
                         style="background-size: 100% 100%;font-size:18px;font-weight:800;color:white;background-image: url('/statics/imgs/extendGroupRegButton.png?v=${params.ver}');width: 100%;height: 45px;">
                        确认修改密码
                    </div>
                </li>
            </ul>
        </div>
    </div>
</div>


<div class="ypfood-head">
    <div class="back-div" onClick="javascript :history.back(-1);"><img src="/statics/imgs/head-back.png?v=${params.ver}"></div>
    <div >
        <span class="title-span">修改密码</span>
    </div>
</div>
<a id='call' href="tel:01058106587" style="display: none;">拨号</a>
<script>
    $("#password").blur(function () {
        if ($("#password").val().length < 6) {
            $("#pw1PopImg").addClass("imgHide");
            $("#pw1Pop").html("密码长度太短,不能小于6位");
        } else {
            $("#pw1PopImg").removeClass("imgHide");
            $("#pw1Pop").html("&nbsp;");
        }
    });
    $("#password2").blur(function () {
        if ($("#password").val() == $("#password2").val() && $("#password2").val().length >= 6) {
            $("#pw2Pop").html("&nbsp;");
            $("#pw2PopImg").removeClass("imgHide");
        } else {
            $("#pw2PopImg").addClass("imgHide");
            $("#pw2Pop").html("两次密码不一致");
        }
    });
    $("#registButton").bind("click", function () {
        var mob = $("#mobile").val();
        var p1 = $("#password").val();
        if (p1.length < 6) {
            return;
        }
        if ($("#registButton").val() == "正在修改密码...") {
            return;
        }

        $("#registButton").val("正在修改密码...");
        json("/user/resentPassword.jspx", { password: p1, mobile: mob}, function (data) {
            if (data.code == 1101 || data.code == 1100) {
                $("#smsPop").html(data.description);
            }
            if (data.code == 0) {
                layer.open({content:"修改密码成功，请重新登录，自动跳转中...",time:3,end : function () {
                    window.location.href = "/user/login.jspx"
                }})
            } else {
                $("#registButton").val("确认修改密码");
            }
        });
    });
</script>